#region "DoForeach"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014/7/8 10:49:16
 * 
 * ####     Namespace : Masterduner.SourceStudio.Practices.DevelopmentLibrary
 * 
 * ####     Type Name : DoForeach
 * 
 * ####     Full Name : Masterduner.SourceStudio.Practices.DevelopmentLibrary.DoForeach
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18408
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion

using System.Collections.Generic;

namespace Masterduner.SourceStudio.Practices.DevelopmentLibrary
{
    /// <summary>
    /// <para>Masterduner.SourceStudio.Practices.DevelopmentLibrary.DoForeach</para>
    /// <para>
    /// 用于执行foreach循环方法。
    /// </para>
    /// </summary>
    /// <typeparam name="TItem">循环元素类型。</typeparam>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    public static class DoForeach<TItem>
    {
        #region Do
        /// <summary>
        /// 执行foreach循环。
        /// </summary>
        /// <param name="forEach"><typeparamref name="TItem"/>类型的<see cref="ForEachExpression{T}"/>委托。</param>
        /// <param name="enumerator">继承自<see cref="IEnumerable{T}"/>接口的对象实例。</param>
        /// <param name="arguments">执行foreach循环所需的附加参数。</param>
        static public void Do(ForEachExpression<TItem> forEach, IEnumerable<TItem> enumerator, params object[] arguments)
        {
            foreach (TItem item in enumerator)
                forEach(item, arguments);
        }
        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion